package com.lm.survey.model;

import com.lm.survey.logic.MP3DataBase;
import com.lm.survey.util.Config;



public class MP3File {
	
	
	String fileName;	
	String folder;
	public String getFolder() {
        return folder;
    }
    public void setFolder(String folder) {
        this.folder = folder;
    }
    public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	String type;
	
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	String desc;
	
	public MP3File(){
		
	}
	
	public String getContextPath(){
		return Config.instance().getStringProperty("WEBContextPath")+Config.instance().getStringProperty("MP3ContextPath")+"/"+folder+"/"+fileName;
		
	}
	
	
	public MP3File(String fileName,String value,String folder){
        this.fileName = fileName;
        this.folder = folder;
        int index = value.indexOf(MP3DataBase.token);
        this.type = value.substring(0,index);
        this.desc = value.substring(index+MP3DataBase.token.length());
        
    }
}
